# -*- encoding=utf8 -*-
__author__ = "Administrator"

from airtest.core.api import *

auto_setup(__file__)

                     
def existsEnter():
    while True:      
        if exists(Template(r"tpl1623052289860.png", record_pos=(0.0, 0.18), resolution=(960, 540))):
            touch(v=(369,154))
            if exists(Template(r"tpl1623052356815.png", record_pos=(-0.005, 0.155), resolution=(960, 540))) == False:
                touch(v=(264,158))            
            if exists(Template(r"tpl1623052356815.png", record_pos=(-0.005, 0.155), resolution=(960, 540))):
                touch(Template(r"tpl1623052356815.png", record_pos=(-0.005, 0.155), resolution=(960, 540)))
                while True:
                    if exists(Template(r"tpl1623052405563.png", record_pos=(0.004, 0.177), resolution=(960, 540))):
                        touch(Template(r"tpl1623052405563.png", record_pos=(0.004, 0.177), resolution=(960, 540)))
                        break                
        if exists(Template(r"tpl1623053020644.png", record_pos=(0.0, 0.18), resolution=(960, 540))):
            
            touch(Template(r"tpl1623053037747.png", record_pos=(-0.002, 0.179), resolution=(960, 540)))
            touch(v=(464,436))
            while True:
                if exists(Template(r"tpl1623053193207.png", record_pos=(-0.08, 0.143), resolution=(960, 540))):
                    break                
                sleep(1)
                touch(v=(464,436))
            break
        
while True:

    if exists(Template(r"tpl1623053193207.png", record_pos=(-0.08, 0.143), resolution=(960, 540))):
        touch(Template(r"tpl1623053193207.png", record_pos=(-0.08, 0.143), resolution=(960, 540)))
        existsEnter()







